package com.mmall.service;

import com.mmall.common.ServerResponse;
import com.mmall.pojo.Category;

import java.util.List;

public interface ICategoryService {
    /**
     * 添加品类
     * @param categoryName
     * @param parentId
     * @return
     */
     ServerResponse addCategory(String categoryName,Integer parentId);

    /**
     * 修改品类
     * @param categoryId
     * @param categoryName
     * @return
     */
     ServerResponse updateCategoryName(Integer categoryId,String categoryName );

    ServerResponse<List<Category>> getChildrenParallelCategory(Integer categoryId);

    /**
     * 递归查询本节点的ID及孩子节点的ID
     * @param categoryId
     * @return
     */
    ServerResponse<List<Integer>> selectCategoryAndChildrenById(Integer categoryId);

}
